package com.sun.mychat.controller;


import com.sun.mychat.pojo.User;
import com.sun.mychat.service.UserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/user")
@CrossOrigin("*")
public class LinkmaController {
    @Autowired
    private UserService userService;

    @PostMapping("/getlist")
    @ApiOperation("获取好友列表")
    public List<User> getList(@RequestBody User user) {
        return userService.getUserFriend(user.getUid());
    }


}
